import React, { Component } from 'react'
import Child7 from './Child7'
import AxiosContext from '../Context/AxiosContext'

export default class Child6 extends Component {
    static contextType = AxiosContext;
  render() {
    return (
      <div>子组件
        <button onClick={()=>{
            this.context.axios({
                method:"get",
                url:"http://localhost:2345/user"
            })
        }}>点击请求数据</button>

        <hr/>
        <Child7 num = {this.props.num}></Child7>
      </div>
    )
  }
}
